
<!--轮播图-->

<template>
    <el-carousel height="100%" direction="vertical" :autoplay="true"  trigger="click"  >
        <el-carousel-item v-for="item in imageList" :key="item" >
            <div :style="{backgroundImage:'url('+item.url+')'}" class="wapper-image">

                <div class="wapper-title">
                    {{item.title}}
                    <div class="wapper-text">
                        {{item.text}}
                    </div>
                </div>
            </div>

        </el-carousel-item>
    </el-carousel>
</template>

<script>
    export default {
        name: "Carousel",
        props:{
            imageList:{
                type:Array,
                default:[]
            }
        }
    }
</script>

<style scoped lang="less">


    .wapper-image{
        width: 100%;
        height: 100%;
        background-size: 100% 100%;
        background-repeat: no-repeat;
        padding: 10px;

        .wapper-title{
            position: fixed;
            left: 50px;
            font-size: 25px;
            bottom: 0;
            width: 100%;
            text-align: left;
            height: 30%;


            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;

            .wapper-text{
                margin-top: 10px;
                font-size: 16px;
            }
        }
    }

    .el-carousel__item h3 {
        color: #475669;
        font-size: 14px;
        opacity: 0.75;
        line-height: 200px;
        margin: 0;


    }

    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
    }

    .el-carousel__item:nth-child(2n + 1) {
        background-color: #d3dce6;
    }
</style>